package com.hom;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class hom1 {
    public static void main(String[] args) {
        Collection coll = new ArrayList();

        coll.add("jim");
        coll.add("tim");

        Iterator ito = coll.iterator();
        while(ito.hasNext()){
            String s = (String)ito.next();
            System.out.println(s);
        }


    }
}
